package com.funtl.framework.java.exception;

import org.apache.log4j.Logger;
import org.apache.log4j.MDC;

/**
 * 
 * @author lwm
 *
 */
public class ServiceException extends RuntimeException {
	private static final long serialVersionUID = -8832957396097811932L;
	private static Logger logger = Logger.getLogger(ServiceException.class);

	public ServiceException() {
		super();
	}

	public ServiceException(String message, Throwable cause) {
		super(message, cause);
		MDC.put("exception", message);
		logger.error(message, cause);
	}

	public ServiceException(String message) {
		super(message);
	}

	public ServiceException(Throwable cause) {
		super(cause);
	}
	
}
